package com.yhtech.actions.basedata;

import java.util.List;

import com.opensymphony.xwork2.ActionSupport;
import com.yhtech.bean.base.Corebase;
import com.yhtech.bean.base.basedata.Store;
import com.yhtech.service.ICoreBaseService;

public class StoreAction extends ActionSupport {
	
	private Store store;
	
	private ICoreBaseService<Corebase> service;

	


	public ICoreBaseService<Corebase> getService() {
		return service;
	}

	public void setService(ICoreBaseService<Corebase> service) {
		this.service = service;
	}

	public Store getStore() {
		return store;
	}

	public void setStore(Store store) {
		this.store = store;
	}
	
	
	public String addManager(){
		service.save(store);
		return SUCCESS;
	}
	
	public String getAllStore(){
		List storeList =service.getAll();
		return SUCCESS;
	}
	
	public String findByNumber(){
		List storeList =service.getAllByProperty("name", store.getNumber());
		return SUCCESS;
	}
	

}
